package com.zhaol.oa.controller;


import com.zhaol.oa.entity.Officemoney;
import com.zhaol.oa.mapper.OfficemoneyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@CrossOrigin
@RestController
public class OfficemoneyController {
    @Autowired
    private OfficemoneyMapper officemoneyMapper;
    @RequestMapping("/selectOfficemoneyList")
    public List<Officemoney> selectOfficemoneyList(Officemoney officemoney){
        return officemoneyMapper.selectOfficemoney(officemoney);
    }
    @RequestMapping("/getOfficemoneyCount")
    public int getCostCount(Officemoney officemoney){
        int total = officemoneyMapper.getCount(officemoney);
        return total;
    }
}
